package com.pajk.user.api.http;

import org.testng.Assert;
import org.testng.annotations.Test;

import com.pajk.test.api.BaseTest;
import com.pajk.test.client.ContextHelper;
import com.pingan.jk.api.request.ApiCode;
import com.pingan.jk.api.request.Device_CheckSecurity;
import com.pingan.jk.api.resp.Api_NumberResp;
import com.pingan.jk.client.ApiContext;
import com.pingan.jk.client.BaseRequest;

public class Device_CheckSecurityIT extends BaseTest{
	@Test(description="device.checkSecurity 检测安全等级 SecurityType.RegisteredDevice")
	public void checkSecurityTest(){
		ApiContext context = super.registerDevice();
		
		String phoneNumber = "13819453412";
		String dynamic = "666666";
		Device_CheckSecurity req = new Device_CheckSecurity(phoneNumber, dynamic);
		ContextHelper.sendRequest(context, new BaseRequest[] { req });
		Assert.assertEquals(req.getReturnCode() , ApiCode.SUCCESS);
		context.setPhoneNumberAndDynamic(phoneNumber, dynamic);
		
		Api_NumberResp res = req.getResponse();
		Assert.assertNotNull(res);
		System.out.println(res.value);
		//
	}
}
